package com.easybuy.dao.impl;

import java.util.List;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.easybuy.dao.MemberDao;
import com.easybuy.entity.Member;

@Repository("memberDao")
public class MemberDaoImpl implements MemberDao {

	@Autowired
	private SqlSessionTemplate sqlSession;

	public void add(Member member) {
		sqlSession.getMapper(MemberDao.class).add(member);
	}

	public List<Member> getList() {
		return sqlSession.getMapper(MemberDao.class).getList();
	}

	public Member login(String username, String pwd) {
		// TODO Auto-generated method stub
		return sqlSession.getMapper(MemberDao.class).login(username, pwd);
	}

}
